package com.totoro.tygeneratedragonblock.manager;


import com.totoro.tygeneratedragonblock.TyGenerateDragonBlock;

public class LoggerManager {

    private Boolean isEnable;

    private final TyGenerateDragonBlock plugin;

    public LoggerManager(TyGenerateDragonBlock plugin) {
        this.plugin = plugin;
        this.isEnable = plugin.getConfigManager().getConfig().getDebug();
    }

    public void info(String msg) {
        this.isEnable = plugin.getConfigManager().getConfig().getDebug();
        if(isEnable) {
            plugin.getLogger().info(msg);
        }
    }

    public void debug(String msg) {
        this.isEnable = plugin.getConfigManager().getConfig().getDebug();
        if(isEnable) {
            plugin.getServer().getConsoleSender().sendMessage("[DEBUG] " + msg);
        }
    }
}
